package route

import (
	"github.com/kataras/iris/v12"
	"one/bootstrap"
	routeadmain "one/route/admin"
	"one/service/admin"
)

func Hub(b *bootstrap.Bootstrapper) {
	api := b.Api

	api.Party("/user").ConfigureContainer(func(r *iris.APIContainer) {
		r.RegisterDependency(admin.NewUserService())
		route := routeadmain.NewUserRoute()
		r.Post("/login", route.Login).Describe("").Title = "用户登录"
	})
}
